<?php

namespace App\Http\Controllers\Api;

use App\Models\Category;
use App\Services\CategoryService;

class CategoriesController extends Controller
{
    // 分类列表
    public function index(CategoryService $categoryService)
    {
        // webapp分类 必须是三级分类
        $tree = $categoryService->getCategoryTreeToWebApp();
        return $this->success($tree);
    }
}
